package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.MallPromoter;
import com.appkubes.mall.core.po.MallPromoterExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface MallPromoterMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_promoter
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallPromoterSqlProvider.class, method="countByExample")
    long countByExample(MallPromoterExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_promoter
     *
     * @mbg.generated
     */
    @DeleteProvider(type=MallPromoterSqlProvider.class, method="deleteByExample")
    int deleteByExample(MallPromoterExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_promoter
     *
     * @mbg.generated
     */
    @Delete({
        "delete from mall_promoter",
        "where promoter_key = #{promoterKey,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String promoterKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_promoter
     *
     * @mbg.generated
     */
    @Insert({
        "insert into mall_promoter (promoter_key, app_key, ",
        "promoter_name, `status`, ",
        "description, statis_uv_count, ",
        "statis_reg_count, statis_auth_count, ",
        "statis_order_count, statis_order_amount_count, ",
        "create_time, bind_admin_key, ",
        "version)",
        "values (#{promoterKey,jdbcType=VARCHAR}, #{appKey,jdbcType=VARCHAR}, ",
        "#{promoterName,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, ",
        "#{description,jdbcType=VARCHAR}, #{statisUvCount,jdbcType=INTEGER}, ",
        "#{statisRegCount,jdbcType=INTEGER}, #{statisAuthCount,jdbcType=INTEGER}, ",
        "#{statisOrderCount,jdbcType=INTEGER}, #{statisOrderAmountCount,jdbcType=DECIMAL}, ",
        "#{createTime,jdbcType=TIMESTAMP}, #{bindAdminKey,jdbcType=VARCHAR}, ",
        "#{version,jdbcType=INTEGER})"
    })
    int insert(MallPromoter record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_promoter
     *
     * @mbg.generated
     */
    @InsertProvider(type=MallPromoterSqlProvider.class, method="insertSelective")
    int insertSelective(MallPromoter record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_promoter
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallPromoterSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="promoter_key", property="promoterKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="promoter_name", property="promoterName", jdbcType=JdbcType.VARCHAR),
        @Result(column="status", property="status", jdbcType=JdbcType.VARCHAR),
        @Result(column="description", property="description", jdbcType=JdbcType.VARCHAR),
        @Result(column="statis_uv_count", property="statisUvCount", jdbcType=JdbcType.INTEGER),
        @Result(column="statis_reg_count", property="statisRegCount", jdbcType=JdbcType.INTEGER),
        @Result(column="statis_auth_count", property="statisAuthCount", jdbcType=JdbcType.INTEGER),
        @Result(column="statis_order_count", property="statisOrderCount", jdbcType=JdbcType.INTEGER),
        @Result(column="statis_order_amount_count", property="statisOrderAmountCount", jdbcType=JdbcType.DECIMAL),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="bind_admin_key", property="bindAdminKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallPromoter> selectByExampleWithRowbounds(MallPromoterExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_promoter
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallPromoterSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="promoter_key", property="promoterKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="promoter_name", property="promoterName", jdbcType=JdbcType.VARCHAR),
        @Result(column="status", property="status", jdbcType=JdbcType.VARCHAR),
        @Result(column="description", property="description", jdbcType=JdbcType.VARCHAR),
        @Result(column="statis_uv_count", property="statisUvCount", jdbcType=JdbcType.INTEGER),
        @Result(column="statis_reg_count", property="statisRegCount", jdbcType=JdbcType.INTEGER),
        @Result(column="statis_auth_count", property="statisAuthCount", jdbcType=JdbcType.INTEGER),
        @Result(column="statis_order_count", property="statisOrderCount", jdbcType=JdbcType.INTEGER),
        @Result(column="statis_order_amount_count", property="statisOrderAmountCount", jdbcType=JdbcType.DECIMAL),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="bind_admin_key", property="bindAdminKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallPromoter> selectByExample(MallPromoterExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_promoter
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "promoter_key, app_key, promoter_name, `status`, description, statis_uv_count, ",
        "statis_reg_count, statis_auth_count, statis_order_count, statis_order_amount_count, ",
        "create_time, bind_admin_key, version",
        "from mall_promoter",
        "where promoter_key = #{promoterKey,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="promoter_key", property="promoterKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="promoter_name", property="promoterName", jdbcType=JdbcType.VARCHAR),
        @Result(column="status", property="status", jdbcType=JdbcType.VARCHAR),
        @Result(column="description", property="description", jdbcType=JdbcType.VARCHAR),
        @Result(column="statis_uv_count", property="statisUvCount", jdbcType=JdbcType.INTEGER),
        @Result(column="statis_reg_count", property="statisRegCount", jdbcType=JdbcType.INTEGER),
        @Result(column="statis_auth_count", property="statisAuthCount", jdbcType=JdbcType.INTEGER),
        @Result(column="statis_order_count", property="statisOrderCount", jdbcType=JdbcType.INTEGER),
        @Result(column="statis_order_amount_count", property="statisOrderAmountCount", jdbcType=JdbcType.DECIMAL),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="bind_admin_key", property="bindAdminKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    MallPromoter selectByPrimaryKey(String promoterKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_promoter
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallPromoterSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") MallPromoter record, @Param("example") MallPromoterExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_promoter
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallPromoterSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") MallPromoter record, @Param("example") MallPromoterExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_promoter
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallPromoterSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(MallPromoter record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_promoter
     *
     * @mbg.generated
     */
    @Update({
        "update mall_promoter",
        "set app_key = #{appKey,jdbcType=VARCHAR},",
          "promoter_name = #{promoterName,jdbcType=VARCHAR},",
          "`status` = #{status,jdbcType=VARCHAR},",
          "description = #{description,jdbcType=VARCHAR},",
          "statis_uv_count = #{statisUvCount,jdbcType=INTEGER},",
          "statis_reg_count = #{statisRegCount,jdbcType=INTEGER},",
          "statis_auth_count = #{statisAuthCount,jdbcType=INTEGER},",
          "statis_order_count = #{statisOrderCount,jdbcType=INTEGER},",
          "statis_order_amount_count = #{statisOrderAmountCount,jdbcType=DECIMAL},",
          "create_time = #{createTime,jdbcType=TIMESTAMP},",
          "bind_admin_key = #{bindAdminKey,jdbcType=VARCHAR},",
          "version = #{version,jdbcType=INTEGER}",
        "where promoter_key = #{promoterKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(MallPromoter record);
}